<?php /*a:2:{s:67:"/www/wwwroot/api.kr.bit-fun.io/app/admin/view/baseconfig/index.html";i:1698033278;s:67:"/www/wwwroot/api.kr.bit-fun.io/app/admin/view/common/container.html";i:1675303108;}*/ ?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/assets/css/icons.min.css" rel="stylesheet" type="text/css" />
<link href="/assets/css/app.min.css" rel="stylesheet" type="text/css" />
<link href="/assets/element/index.css" rel="stylesheet">
<link href="/assets/css/base.css" rel="stylesheet">
<script src="/assets/element/vue.js"></script>
<script src="/assets/element/index.js"></script>
<script src="/assets/js/axios.min.js"></script>
<script src="/components/base.component.js"></script>
<script src="/assets/libs/jquery/jquery.min.js"></script>
<script src="/assets/libs/metismenu/metisMenu.min.js"></script>
<script src="/assets/js/js.cookie.min.js"></script>
<script src="/assets/js/common.js"></script>
<script src="/assets/js/ERC20.js"></script>
<script src="/assets/js/web3.min.js"></script>
    <style>
        .node {cursor: pointer;}
        .node circle {fill: #fff;stroke: steelblue;stroke-width: 1.5px;}
        .node text {font: 10px sans-serif;}
        .link {fill: none;stroke: #ccc;stroke-width: 1.5px;}
        .tree{width: 100%;height: 1200px;margin: 0 auto;}
        .tree svg{width: 100%;height: 100%;}
    </style>
<!--<script src="/assets/js/TronWeb.js"></script>-->

<script type="text/javascript">
Vue.config.productionTip = false
<?php
$dialogstate = request()->get('dialogstate');
?>
const base_url = '<?php echo getBaseUrl()?>';
const base_dir = '';//勿要删除
</script>

</head>


<body>
<header id="page-topbar" style="position:fixed;left:0; top:0; z-index:999;<?php if($dialogstate == 1): ?>display:none;<?php endif; ?>" v-cloak>
	<div class="navbar-header">
		<div class="d-flex">
			<div class="navbar-header">
				<div class="d-flex" data-toggle="cospan">
					<i style="margin-left:15px;" id="vertical-menu-btn" class="el-icon-s-fold"></i>
					<i style="margin-left:15px;" @click="reload" class="el-icon-refresh hidden-sm-and-down"></i>
				</div>
				<div class="d-flex hidden-sm-and-down">
					<el-breadcrumb separator="/" style="margin-left:30px;">
						<el-breadcrumb-item v-for="item in levelList" :key="item.path">
							<a v-if="item.title == '首页'" :href="item.path">{{item.title}}</a>
							<span v-else>{{item.title}}</span>
						</el-breadcrumb-item>
					</el-breadcrumb>
				</div>
			</div>
		</div>
		<div class="d-flex">
			<div class="iconbutton">
				<el-tooltip content="清除缓存" effect="dark" placement="bottom">
					<i @click="clearCache()" class="icontool el-icon-delete"></i>
				</el-tooltip>
			</div>
			
			<div class="iconbutton">
				<el-avatar src="<?php echo config('base_config.logo'); ?>" style="vertical-align:middle"></el-avatar>
				<el-dropdown trigger="click" placement="bottom" style="cursor: pointer;margin-right:15px;">
					<span class="el-dropdown-link">
						<?php echo session('admin.username'); ?><i style="margin-left:0px; font-size:100%" class="icontool el-icon-arrow-down"></i>
					</span>
					<el-dropdown-menu slot="dropdown">
						<el-dropdown-item icon="el-icon-lock" @click.native.prevent="passwordDialogStatus = true">修改密码</el-dropdown-item>
						<el-dropdown-item icon="el-icon-back" @click.native.prevent="logout">退出</el-dropdown-item>
					</el-dropdown-menu>
				</el-dropdown>
			</div>
			<div class="iconbutton" style="margin-left:0">
				<i class="bx bx-cog bx-spin right-bar-toggle"></i>
			</div>
		</div>
	</div>
	
	<el-dialog title="重置密码" style="margin-top:100px;" width="450px"  :visible="passwordDialogStatus" :before-close="closeForm" append-to-body>
		<el-form :size="size" ref="form" :model="form" :rules="rules" label-width="80px">
			<el-row>
				<el-col :span="24">
					<el-form-item label="新密码" prop="password">
						<el-input  show-password autoComplete="off" v-model="form.password"  clearable placeholder="请输入密码"/>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="确认密码" prop="repassword">
						<el-input  show-password autoComplete="off" v-model="form.repassword"  clearable placeholder="请输入确认密码"/>
					</el-form-item>
				</el-col>
			</el-row>
		</el-form>
		<div slot="footer" class="dialog-footer">
			<el-button :size="size" :loading="loading" type="primary" @click="submit" >
				<span v-if="!loading">确 定</span>
				<span v-else>提 交 中...</span>
			</el-button>
			<el-button :size="size" @click="closeForm">取 消</el-button>
		</div>
	</el-dialog>
</header>

<script>
	// import Web3 from 'web3';
new Vue({
	el: '#page-topbar',
	data(){
		var validatePass2 = (rule, value, callback) => {
			if(value === '') {
				callback(new Error('请再次输入密码'))
			}else if (value !== this.form.password) {
				callback(new Error('两次输入密码不一致!'))
			}else {
				callback()
			}
		}
		return {
			form: {
				password:'',
				repassword:'',
			},
			url:{},
			levelList:[],
			notice:[],
			passwordDialogStatus:false,
			loading:false,
			size:'small',
			urlobj:{},//这里是判断如果是弹窗链接的话 不显示头部
			rules: {
                password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],
				repassword:[
					{required: true, validator: validatePass2, trigger: 'blur'},
				],
			}
		}
	},
	mounted(){

		let abi = Ercbnb()
		async function getTokenTransfer(){

			window.web3 = new Web3(window.ethereum);
			const res = await ethereum.request({ method: 'eth_chainId' });
			if(res == '0x1') {
				alert('请切换到BSC网络')
				return;
			}
			accounts = await ethereum.enable();
			if(accounts.length<1)
			{
				if(ethereum.isMetaMask)
				{
					alert('已检测到MetaMask，请确认MetaMask是否已登录!')
					return;
				}
				else
				{
					alert('已检测到MetaMask，请确认TokenPocket有BSC账户!')
					return;
				}
				return;
			}
		}

		if(sessionStorage.getItem(base_url+'breadcrumb')){
			const menuList = JSON.parse(sessionStorage.getItem(base_url+'breadcrumb'))
			this.url = new URL(window.location.href)
			let menus = this.getMenus(menuList)
			let home = [{title:'首页', path:base_url+'/Index/main.html'}]
			if (menus !== undefined) {
				if(this.url.pathname !== base_url+'/Index/main.html' && this.url.href !== base_url+'/Index/main.html'){
					menus = home.concat(menus)
				}
			}else{
				menus = home
			}
			
			this.levelList = menus
		}
	},
	methods:{
		getMenus(menuList,arr,z){
            arr = arr || []
            z = z || 0
            for (let i = 0; i < menuList.length; i++) {
                let item = menuList[i]
                arr[z] = item
                if(this.url.pathname === menuList[i].url || this.url.href === menuList[i].url){
                   return arr.slice(0,z + 1)
                }
                if(menuList[i].children && menuList[i].children.length){
                   let res = this.getMenus(menuList[i].children,arr,z+1)
                   if(res){
                       return res
                   }
                }
            }
        },
		submit(){
			this.$refs['form'].validate(valid => {
				if(valid) {
					this.loading = true
					axios.post(base_url+'/Base/resetPwd',this.form).then(res => {
						if(res.data.status == 200){
							this.$message({message: '操作成功', type: 'success'})
							this.closeForm()
						}else{
							this.$message.error(res.data.msg)
						}
					}).catch(()=>{
						this.loading = false
					})
				}
			})
		},
		closeForm(){
			this.passwordDialogStatus = false
			this.loading = false
			if (this.$refs['form']!==undefined) {
				this.$refs['form'].resetFields()
			}
		},
		getNotice(){
			axios.post(base_url+'/Index/getNotice').then(res => {
				if(res.data.status == 200){
					this.notice = res.data.data
				}
			})
		},
		clearCache(){
			this.$confirm('确定清除缓存吗?', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(()=>{
				axios.post(base_url+'/Base/clearCache').then(res => {
					if(res.data.status == 200){
						this.$message({message: '操作成功', type: 'success'})
					}
				})
			})
		},
		logout(){
			this.$confirm('确定注销并且退出系统?', '提示', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
			}).then(()=>{
				axios.get(base_url+'/Login/logout').then(res => {
					if(res.data.status == 200){
						sessionStorage.setItem(base_url+'breadcrumb','')
						Cookies.set(base_url+'menu','')
						top.parent.frames.location.href = base_url+'/login/index'
					}
				})
			})
		},
		reload(){
			location.reload()
		},
	},
})
</script>

<div id="app" class="page-content" :style="!urlobj.dialogstate ? 'margin-top:60px;':'margin-top:10px;'">
	<tab-tag v-if="!urlobj.dialogstate"></tab-tag>
	
<div style="margin:0 15px 15px 15px;">
<el-card shadow="never" class="card" style="min-height:650px;">
	<el-form size="small" ref="form" :model="form" :rules="rules" label-width="130px" >
	<el-tabs v-model="activeName">
		<el-tab-pane style="padding-top:10px"  label="基本信息" name="基本信息">
				<el-row >
					<el-col :span="24">
						<el-form-item label="站点名称" prop="site_title">
							<el-input  v-model="form.site_title" autoComplete="off" clearable  placeholder="请输入站点名称"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="站点logo" prop="logo">
							<Upload size="small"      file_type="image" :image.sync="form.logo"></Upload>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="站点关键词" prop="keyword">
							<Tag :tag_list.sync="form.keyword"></Tag>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="官方邮箱" prop="system_mailbox">
							<el-input  v-model="form.system_mailbox" autoComplete="off" clearable  placeholder="请输入官方邮箱"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="站点描述" prop="descrip">
							<el-input  type="textarea" autoComplete="off" v-model="form.descrip"  :autosize="{ minRows: 2, maxRows: 4}" clearable placeholder="请输入站点描述"/>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="站点版权" prop="copyright">
							<el-input  v-model="form.copyright" autoComplete="off" clearable  placeholder="请输入站点版权"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
                <el-row >
                    <el-col :span="24">
                        <el-form-item label="首页矩阵介绍" prop="matrix_introduction">
                            <wang-editor  :wangcontent.sync="form.matrix_introduction"></wang-editor>
                        </el-form-item>
                    </el-col>
                </el-row>
		</el-tab-pane>
		<el-tab-pane style="padding-top:10px;" v-if="files" label="拓展信息" name="拓展信息">
				<el-row >
					<el-col :span="24">
						<el-form-item label="上传配置" prop="filesize">
							<el-input  v-model="form.filesize" autoComplete="off" clearable  placeholder="请输入上传配置"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="文件类型" prop="filetype">
							<el-input  v-model="form.filetype" autoComplete="off" clearable  placeholder="请输入文件类型"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="水印状态" prop="water_status">
							<el-radio-group v-model="form.water_status">
								<el-radio :label="'1'">正常</el-radio>
								<el-radio :label="'0'">禁用</el-radio>
							</el-radio-group>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="水印位置" prop="water_position">
							<el-select style="width:100%" v-model="form.water_position" filterable clearable placeholder="请选择水印位置">
								<el-option key="0" label="左上角水印" :value="'1'"></el-option>
								<el-option key="1" label="上居中水印" :value="'2'"></el-option>
								<el-option key="2" label="右上角水印" :value="'3'"></el-option>
								<el-option key="3" label="左居中水印" :value="'4'"></el-option>
								<el-option key="4" label="居中水印" :value="'5'"></el-option>
								<el-option key="5" label="右居中水印" :value="'6'"></el-option>
								<el-option key="6" label="左下角水印" :value="'7'"></el-option>
								<el-option key="7" label="下居中水印" :value="'8'"></el-option>
								<el-option key="8" label="右下角水印" :value="'9'"></el-option>
							</el-select>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="水印透明度" prop="water_alpha">
							<el-slider v-model="form.water_alpha"></el-slider>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row >
					<el-col :span="24">
						<el-form-item label="绑定域名" prop="domain">
							<el-input  v-model="form.domain" autoComplete="off" clearable  placeholder="请输入绑定域名"></el-input>
						</el-form-item>
					</el-col>
				</el-row>
		</el-tab-pane>
		<el-tab-pane style="padding-top:10px"  label="矩阵设置" name="矩阵设置" v-if='isShow'>
			<el-row >
				<el-col :span="24">
					<el-form-item label="奖励点倍数" prop="bonus_multiple">
						<el-input type="number" v-model="form.bonus_multiple" autoComplete="off" clearable  placeholder="请输入倍数"></el-input>
						<small style="color: rgb(192, 196, 204);">参与矩阵,返回参与数量倍数的奖励点(假设2倍 例:参与100U,返200奖励点)</small>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="参与矩阵金额倍数" prop="participate_multiple">
						<el-input type="number" v-model="form.participate_multiple" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
						<small style="color: #C0C4CC">用户参与矩阵的数量必须是n的倍数</small>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="最低参与金额" prop="participate_num">
						<el-input type="number" v-model="form.participate_num" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="购买者分红点奖励(%):" prop="bonus_party">
						<el-input type="number" v-model="form.bonus_party" autoComplete="off" clearable  placeholder="请输入百分比"></el-input>
						<small style="color: rgb(192, 196, 204);">参与矩阵,获得分红点(假设100% 例:参与100U,获得100分红点)</small>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="直推分红点奖励(%):" prop="bonus_superior">
						<el-input type="number" v-model="form.bonus_superior" autoComplete="off" clearable  placeholder="请输入百分比"></el-input>
						<small style="color: rgb(192, 196, 204);">下级参与矩阵,获得分红点(假设20% 例:参与100U,获得20分红点)</small>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="间推分红点奖励(%):" prop="bonus_indirect">
						<el-input type="number" v-model="form.bonus_indirect" autoComplete="off" clearable  placeholder="请输入百分比"></el-input>
						<small style="color: rgb(192, 196, 204);">下下级参与矩阵,获得分红点(假设20% 例:参与100U,获得20分红点)</small>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="静态释放 %" prop="static_release">
						<el-input type="number" v-model="form.static_release" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="动态释放 %" prop="dynamic_release">
						<el-input type="number" v-model="form.dynamic_release" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="矩阵团队极差" prop="team_range_status">
						<el-switch v-model="form.team_range_status" active-color="#13ce66" inactive-color="#ff4949" active-value="1" inactive-value="0"></el-switch>
					</el-form-item>
				</el-col>
			</el-row>
		</el-tab-pane>
		<el-tab-pane style="padding-top:10px"  label="财务设置" name="财务设置">
			<el-row>
				<el-col :span="24">
					<el-form-item label="剩余可释放LP" prop="release_lp">
						<el-input type="number" v-model="form.release_lp" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="U提现手续费类型" prop="withdrawal_money_type">
						<el-radio-group v-model="form.withdrawal_money_type">
							<el-radio :label="'1'">百分比</el-radio>
							<el-radio :label="'2'">固定值</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="U提现手续费" prop="withdrawal_money">
						<el-input type="number" v-model="form.withdrawal_money" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="最低提现金额" prop="min_withdrawal">
						<el-input type="number" v-model="form.min_withdrawal" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="U转账手续费类型" prop="accounts_withdrawal_type">
						<el-radio-group v-model="form.accounts_withdrawal_type">
							<el-radio :label="'1'">百分比</el-radio>
							<el-radio :label="'2'">固定值</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="转账手续费" prop="accounts_withdrawal">
						<el-input type="number" v-model="form.accounts_withdrawal" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="最低转账金额" prop="min_accounts">
						<el-input type="number" v-model="form.min_accounts" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="注册代币奖励" prop="register_cid">
						<el-select style="width:100%" v-model="form.register_cid" filterable clearable placeholder="请选择奖励代币">
							<el-option v-for="(item,i) in currency" :key="i" :label="item.name" :value="item.id"></el-option>
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="注册代币奖励数量" prop="register_num">
						<el-input type="number" v-model="form.register_num" autoComplete="off" clearable  placeholder="请输入数字"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
<!--			<el-row >-->
<!--				<el-col :span="24">-->
<!--					<el-form-item label="质押代币" prop="pledge_cid">-->
<!--						<el-select style="width:100%" v-model="form.pledge_cid" filterable clearable placeholder="请选择质押代币">-->
<!--							<el-option v-for="(item,i) in currency" :key="i" :label="item.name" :value="item.id"></el-option>-->
<!--						</el-select>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
<!--			</el-row>-->
<!--			<el-row >-->
<!--				<el-col :span="24">-->
<!--					<el-form-item label="质押释放代币" prop="pledge_release_cid">-->
<!--						<el-select style="width:100%" v-model="form.pledge_release_cid" filterable clearable placeholder="请选择质押释放代币">-->
<!--							<el-option v-for="(item,i) in currency" :key="i" :label="item.name" :value="item.id"></el-option>-->
<!--						</el-select>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
<!--			</el-row>-->
<!--			<el-row >-->
<!--				<el-col :span="24">-->
<!--					<el-form-item label="每日质押奖励比例(%)" prop="pledge_num">-->
<!--						<el-input type="number" v-model="form.pledge_num" autoComplete="off" clearable  placeholder="请输入数字"></el-input>-->
<!--					</el-form-item>-->
<!--				</el-col>-->
<!--			</el-row>-->
		</el-tab-pane>
		<el-tab-pane style="padding-top:10px"  label="币种兑换" name="币种兑换">
			<el-row >
				<el-col :span="24">
					<el-form-item label="USDT兑美金" prop="usdt_exchange">
						<el-input type="number" v-model="form.usdt_exchange" autoComplete="off" clearable  placeholder="请输入比例"></el-input>
						<small style="color: rgb(192, 196, 204);">兑换比例 N : 1美金</small>
					</el-form-item>
				</el-col>
			</el-row>
		</el-tab-pane>
		<el-tab-pane v-if="address" style="padding-top:10px;"  label="钱包设置" name="钱包设置">
			<el-row >
				<el-col :span="24">
					<el-form-item label="账号分配类型" prop="address_tyoe">
						<el-radio-group v-model="form.address_tyoe">
							<el-radio :label="'1'">ECP20与TRC20</el-radio>
							<el-radio :label="'2'">ECP20</el-radio>
							<el-radio :label="'3'">TRC20</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="钱包前缀" prop="address_prefix">
						<el-input v-model="form.address_prefix" autoComplete="off" clearable  placeholder="请输入钱包地址前缀"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="钱包地址长度" prop="wallet_address_length">
						<el-input type="number" v-model="form.wallet_address_length" autoComplete="off" clearable  placeholder="请输入钱包地址长度"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="TRC20充值地址" prop="usdt_address">
						<el-input v-model="form.usdt_address" autoComplete="off" clearable  placeholder="请输入钱包地址"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row >
				<el-col :span="24">
					<el-form-item label="BEP充值地址" prop="bep_usdt_address">
						<el-input v-model="form.bep_usdt_address" autoComplete="off" clearable  placeholder="请输入钱包地址"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
		</el-tab-pane>
		<el-tab-pane style="padding-top:10px;display: none;"  label="其他设置" name="其他设置">
			<el-row >
				<el-col :span="12">
					<el-form-item label="用户邀请码:" prop="member_code">
						<el-select style="width:100%" v-model="form.member_code" filterable clearable placeholder="请选择用户邀请码方式">
							<el-option key="0" label="邀请码" :value="'1'"></el-option>
							<el-option key="1" label="钱包地址" :value="'2'"></el-option>
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="24">
					<el-form-item label="安卓下载地址" prop="download_apk">
						<el-input v-model="form.download_apk" autoComplete="off" clearable  placeholder="请输入安卓下载地址"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="24">
					<el-form-item label="IOS下载地址" prop="download_ios">
						<el-input v-model="form.download_ios" autoComplete="off" clearable  placeholder="请输入IOS下载地址"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="24">
					<el-form-item label="版本号" prop="version">
						<el-input v-model="form.version" autoComplete="off" clearable  placeholder="请输入版本号"></el-input>
					</el-form-item>
				</el-col>
			</el-row>

		</el-tab-pane>
	</el-tabs>
		<el-form-item>
			<el-button size="small" type="primary" @click="submit">保存设置</el-button>
		</el-form-item>
	</el-form>
</el-card>
</div>

</div>

<div class="right-bar" id="rightbar">
	<div data-simplebar class="h-100">
		<div class="rightbar-title flex align-items-center bg-dark p-3">
			<h5 class="m-0 me-2 text-white">主题设置</h5>
			<a href="javascript:void(0);" class="right-bar-toggle ms-auto">
				<i class="mdi mdi-close noti-icon"></i>
			</a>
		</div>
		<div class="drawer-container">
			<div class="drawer-item">
				<span>标签页</span>
				<el-switch @change="selectTag" :active-value="1" :inactive-value="0" v-model="setting.tagsView" class="drawer-switch" />
			</div>
			<div class="drawer-item">
				<p>顶部背景色</p>
				<el-radio-group v-model="setting.topbg" @change="selectTopBg" size="mini">
					<el-radio-button label="light">白色</el-radio-button>
					<el-radio-button label="blank">黑色</el-radio-button>
					<el-radio-button label="dark">蓝色</el-radio-button>
				</el-radio-group>
			</div>
			<div class="drawer-item">
				<p>侧栏背景色</p>
				<el-radio-group v-model="setting.sidebg" @change="selectSideBg" size="mini">
					<el-radio-button label="dark">黑色</el-radio-button>
					<el-radio-button label="brand">蓝色</el-radio-button>
					<el-radio-button label="light">白色</el-radio-button>
				</el-radio-group>
			</div>
        </div>
	</div>
</div>
<div class="rightbar-overlay"></div>
<script>
var siteconfig 
if(Cookies.get(base_url+'siteconfig')){
	siteconfig = JSON.parse(Cookies.get(base_url+'siteconfig'))
	document.body.setAttribute('data-topbar', siteconfig.topbg)
	parent.document.body.setAttribute('data-sidebar', siteconfig.sidebg)
	var classname = !siteconfig.tagsView ? 'hiddenbox' : 'showbox'
	document.getElementById('app').setAttribute('tag-box', classname)
}

new Vue({
	el: '#rightbar',
	data(){
		return {
			setting:{
				tagsView:1,
				topbg:'light',
				sidebg:'dark',
			}
		}
	},
	mounted(){
		if(Cookies.get(base_url+'siteconfig')){
			this.setting = JSON.parse(Cookies.get(base_url+'siteconfig'))
		}
	},
	methods:{
		selectTopBg(val){
			document.body.setAttribute('data-topbar', val)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		},
		selectSideBg(val){
			parent.document.body.setAttribute('data-sidebar', val)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		},
		selectTag(val){
			var classname = !val ? 'hiddenbox' : 'showbox'
			document.getElementById('app').setAttribute('tag-box', classname)
			Cookies.set(base_url+'siteconfig',JSON.stringify(this.setting))
		}
	},
})
</script>

<script src="/assets/js/app.js"></script>
<script>
new Vue({
	el: '#app',
	components:{
	},
	data(){
		return {
			form: {
				site_title:'',
				logo:'',
				keyword:[],
				system_mailbox:'',
				descrip:'',
				copyright:'',
				filesize:'0',
				filetype:'',
				water_status:1,
				member_code:1,
				domain:'',
				usdt_exchange:1,
				adc_exchange:10,
				bonus_multiple:'',
				bonus_indirect:'',
				participate_multiple:'',
				participate_num:'',
				static_release:'',
				dynamic_release:'',
                mining_destruction:0,
				mining_daily_production:1000,
				mining_production_frequency:144,
				pledge_return:100,
				team_range_status:1,
				article_ecology:'',
				article_game:'',
				article_aboutmmst:'',
				article_contactus:'',
				matrix_introduction:'',
				download_apk:'',
				download_ios:'',
				version:'',
				gj_address:'',
				withdrawal_money_type:1,
				accounts_withdrawal_type:1,
				adc_accounts_withdrawal:'',
				adc_destroy:0,
				address_prefix:'',
				wallet_address_length:'',
				address_tyoe:1,
				register_cid:0,
				pledge_release_cid:0,
				register_num:0,
				direct_reward:0,
				direct_reward_cid:0,
				direct_reward_num:'',
				bep_usdt_address:'',
			},
			currency:[],
			show:true,
			loading:false,
			is_clear:false,
			files:false,
			isShow:false,
			address:false,
			activeName:'基本信息',
			rules: {
			}
		}
	},
	mounted(){
		axios.post(base_url + '/Currency/available_currency').then(res => {
			if(res.data.status == 200){
				this.currency = res.data.data
				this.form.vals = [];
				this.currency.unshift({id:0,name:'无代币奖励'});
				this.currency.forEach(item=>{
					this.form.vals.push({id:item.id,name:item.name})
				})
			}
		})
		axios.post(base_url + '/Baseconfig/getInfo').then(res => {
			if(res.data.status == 200){
				this.form = JSON.stringify(res.data.data) == '[]' ? {} : res.data.data
				this.setDefaultVal('keyword')
			}
		})
	},
	methods: {
		submit(){
			this.$refs['form'].validate(valid => {
				if(valid) {
					this.loading = true
					axios.post(base_url + '/Baseconfig/index',this.form).then(res => {
						if(res.data.status == 200){
							this.$message({message: res.data.msg, type: 'success'})
						}else{
							this.loading = false
							this.$message.error(res.data.msg)
						}
					}).catch(()=>{
						this.loading = false
					})
				}
			})
		},
		setDefaultVal(key){
			if(this.form[key] == null || this.form[key] == ''){
				this.form[key] = []
			}
		},
	}
})
</script>

</body>
</html>